package com.wsc.metastock.model.bean;

public class Quote implements Comparable<Quote>{
    private String symbol;
    private String date; //yyyyMMdd
    private String open;
    private String high;
    private String low;
    private String close;
    private String volume;
    private String openInt;

    @Override
    public String toString() {
        return symbol + ",D," + date + "," + open + "," + high + "," + low + "," + close + "," + volume + ",0";
    }

    public String getSymbol() {
        return symbol;
    }

    public void setSymbol(String symbol) {
        this.symbol = symbol;
    }

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }

    public String getOpen() {
        return open;
    }

    public void setOpen(String open) {
        this.open = open;
    }

    public String getHigh() {
        return high;
    }

    public void setHigh(String high) {
        this.high = high;
    }

    public String getLow() {
        return low;
    }

    public void setLow(String low) {
        this.low = low;
    }

    public String getClose() {
        return close;
    }

    public void setClose(String close) {
        this.close = close;
    }

    public String getVolume() {
        return volume;
    }

    public void setVolume(String volume) {
        this.volume = volume;
    }

    public String getOpenInt() {
        return openInt;
    }

    public void setOpenInt(String openInt) {
        this.openInt = openInt;
    }

    public int compareTo(Quote o) {
        if(new Integer(date).intValue()> (new Integer(o.date).intValue())){
            return -1;
        }else{
            return 1;
        }
    }

}
